package ch03.cjlibproxy;

import net.sf.cglib.proxy.MethodInterceptor;
import net.sf.cglib.proxy.MethodProxy;

import java.lang.reflect.Method;

/**
 * @author Jane
 * @date 2024-03-25 17:13
 */

public class BuyInterceptor implements MethodInterceptor {
    /**
     * 拦截方法
     * @param o
     * @param method
     * @param objects
     * @param methodProxy
     * @return
     * @throws Throwable
     */
    @Override
    public Object intercept(Object o, Method method, Object[] objects, MethodProxy methodProxy) throws Throwable {

        Object res = methodProxy.invokeSuper(o, objects);

        return res;
    }
}
